package model;

// Generated Jun 9, 2011 1:02:18 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TestIntrebari generated by hbm2java
 */
@Entity
@Table(name = "test_intrebari", catalog = "mydb")
public class TestIntrebari implements java.io.Serializable {

	private Integer intrebareId;
	private Teste teste;
	private String intrebare;
	private String tip;
	private Set<TestRaspunsuri> testRaspunsuris = new HashSet<TestRaspunsuri>(0);

	public TestIntrebari() {
	}

	public TestIntrebari(Teste teste, String intrebare, String tip,
			Set<TestRaspunsuri> testRaspunsuris) {
		this.teste = teste;
		this.intrebare = intrebare;
		this.tip = tip;
		this.testRaspunsuris = testRaspunsuris;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "intrebare_id", unique = true, nullable = false)
	public Integer getIntrebareId() {
		return this.intrebareId;
	}

	public void setIntrebareId(Integer intrebareId) {
		this.intrebareId = intrebareId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "test_id")
	public Teste getTeste() {
		return this.teste;
	}

	public void setTeste(Teste teste) {
		this.teste = teste;
	}

	@Column(name = "intrebare", length = 155)
	public String getIntrebare() {
		return this.intrebare;
	}

	public void setIntrebare(String intrebare) {
		this.intrebare = intrebare;
	}

	@Column(name = "tip", length = 50)
	public String getTip() {
		return this.tip;
	}

	public void setTip(String tip) {
		this.tip = tip;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "testIntrebari")
	public Set<TestRaspunsuri> getTestRaspunsuris() {
		return this.testRaspunsuris;
	}

	public void setTestRaspunsuris(Set<TestRaspunsuri> testRaspunsuris) {
		this.testRaspunsuris = testRaspunsuris;
	}

}
